using System;
using System.Collections.Generic;
using System.Text;

namespace Eve.Data
{
    // notes: rev 2.0 only
    public class CorporationTrade : EveAssociation<Corporation, Type>
    {
        private double supplyDemand;

        public Corporation Corporation
        {
            get { return From; }
        }
        public Type Item
        {
            get { return To; }
        }
        public double SupplyDemand
        {
            get { return supplyDemand; }
        }

        internal CorporationTrade(DbDataRow dr) : 
            base(dr.Database, new Corporation(dr.Database, dr["corporationID"]), new Type(dr.Database, dr["typeID"]))
        {
            Fill(dr);
        }
        internal CorporationTrade(DbDataRow dr, Corporation corp)
            :
            base(dr.Database, corp, new Type(dr.Database, dr["typeID"]))
        {
            Fill(dr);
        }

        private void Fill(DbDataRow dr)
        {
            supplyDemand = dr["supplyDemand"];
        }

    }
}
